<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<?php
	session_start(); 
	include "../User_access/access_eleve.php";
	include 'includes/bandeau_sup.php';
?>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700' rel='stylesheet' type='text/css'>
		<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'>
		<link rel='stylesheet' href='includes/style.css' />
	</head>
	<body>
		<header>
			<h1>Consultation de sa table des compétences</h1>
		</header>
		<div id='bloc_page'>
			<section>
				<article>
							<p>
								<?php
									include "../conf/config.php";

									$db = mysql_connect($host, $user_select, $mdp_select);
									$db_name="website"; // Database name 
									$nom=$_SESSION['user']['Nom'];

									
									// Connect to server and select databse.
									$result = mysql_select_db("$db_name")or die("ne peut selectioner DB");
									if (!$result) {
		 								$message  = 'Requête invalide : ' . mysql_error() . "\n";
										$message .= 'Requête complète : ' . $query;
										die($message);
									}
									
									
									$sql="SELECT evo.progression, evo.date_modif, comp.nomComp
									FROM comp, evo, user
									WHERE '$nom'= user.Nom 
									AND evo.id_comp=comp.id_comp
									AND evo.id_user=user.id_user";
									// echo $sql;
									$query=mysql_query($sql);
									echo "<table>";
									while($row = mysql_fetch_array($query))
									{
										echo "<tr> <td>".$row['nomComp'] . "</td><td>" .$row['progression'] . "%</td><td>En date du : " .$row['date_modif']. "</td></tr>";
									} 
									echo "</table>";
									

								?>
							</p>

				</article>		
				<article>
					<p><a href="index.php">Revenir au menu</a></p>	
				</article>
			</section>
			<?php include "includes/footer.php"; ?>
		</div>
	</body>
</html>